package org.tong.database.redis;

import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.connection.MessageListener;
import org.springframework.stereotype.Component;

@Component
public class MyRedisConfig implements MessageListener {


    @Override
    public void onMessage(Message message, byte[] pattern) {
        System.out.println(String.format("topic:%s, msg:%s", new String(pattern), message.getBody()));
    }
}
